const routes = [
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/index.vue'),
      children:[ //二级路由
        {
          path: '/index/home',
          name: 'home',
          component: () => import('../views/index/FirstPage.vue'),
        },
        {
          path: '/index/MainPage',
          name: 'MainPage',
          component: () => import('../views/index/MainPage.vue'),
        },
        {
          path: '/index/Moue',
          name: 'Moue',
          component: () => import('../views/index/Moue.vue'),
        },
        {
          path: '/index/Mine',
          name: 'Mine',
          component: () => import('../views/index/Mine.vue'),
        },
        {
          path:'/',
          redirect:'/index/home'
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue'),
    },
    {
      path: '/regider',
      name: 'regider',
      component: () => import('../views/regider.vue'),
    },
    {
      path:'/detail/:id',
      meta: { title:'详情页' },
      component: () => import('../views/Detail.vue')
    },       
    {
      path:'/place/',
      meta: 'place',
      component: () => import('../views/place.vue')
    },       
    {
      path:'/sousuo/',
      meta: 'sousuo',
      component: () => import('../views/sousuo.vue')
    },       
    {
      path:'/',
      redirect:'/index'
    },
    // 404 路由
    {
      path:'*', // * 表示匹配任何路由(所有路由)
      component: () => import('../views/NotFound.vue')
    }

]

export default routes;